<?php
	
	error_reporting(E_ALL | E_STRICT);
	session_start();

	ini_set('display errors', 1);
	date_default_timezone_set('Europe/London');
	set_include_path('./lib'.PATH_SEPARATOR.'applications/models');	
	
	require_once "loaderLang.php";
	//echo $_SESSION["lang"];

	require_once "config.php";	
	require_once "header.php";
	
	include "./applications/default/components/loadMainContent.php";
	include "./applications/default/components/countView.php";
		

	
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php include "./lib/headinit.php" ?>
<title><?php echo constant("TITLE_HOME_PAGE")?> </title>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
	$('#black-slideshow').slideDown('slow',function(){
		$('#black-slideshow img').fadeIn(1200,function(){
			$.get('contact_detail.php',function(data){
				$('#contact-detail').html(data);
			});
		});
			
		
	});
	
	var tooltipFocused=false;
	
	$('#black-slideshow img').hover(function(){
			$(this).parent().addClass('SlideHover');
			$(this).prev().slideDown('fast');
		},function(){
		if(tooltipFocused){
			tooltipFocused=false;
			return;
		}
		$(this).parent().removeClass('SlideHover');
		$(this).prev().slideUp('fast');
		
	});
	
	$('#black-slideshow p').hover(function(){
		tooltipFocused=true;
		},function(){ 
	});
	
	$('#black-slideshow p').hover(function(){
			//$(this).stop();
		},function(){
	});
	$('#black-slideshow p').click(function(){
			$('#slide-list').slideUp('slow');
			var curSrc=$(this).next().attr('src');
			curSrc=curSrc.replace('home','full');
			$('#slide-full img').attr('src',curSrc);
			/* $.blockUI({ 
            message: $(this).parent().parent(), 
            css: {
				backgroundColor:'#333',
                top:  ($(window).height() - 600) /2 + 'px', 
                left: ($(window).width() - 404) /2 + 'px', 
                width: '604px' ,
				height:'900px'
			}  
			}); */
			
			$('#slide-full img').load(function(){
				$('#slide-full').slideDown('slow');
				$('#black-slideshow').css('height','1500');
			});
			
        
	});
	
	$('#black-slideshow img').click(function(){
		$(this).parent().addClass('SlideClick');
		$(this).fadeOut(400);
		var curSrc=$(this).attr('src');
		var srcNode=curSrc.split(".");
		var curIndex=parseInt(srcNode[1]);
		curIndex=(curIndex+3)%12;
		$(this).attr('src', srcNode[0]+'.'+curIndex+'.'+srcNode[2]);
		
		
		$(this).load(function(){
			$(this).fadeIn(400,function(){
				$(this).parent().removeClass('SlideClick');
			});
		});
			
		
		
	});
});
function hideFullImage(){
	$('#slide-list').slideDown('slow',function(){
		$('#slide-full').slideUp('slow',function(){
		$('#black-slideshow').css('height','900');
		window.location='#cB';
		});
	});
	
	
}
</script>
<style>
.DLTypeIntro{
	margin-bottom:40px;
	height:900px;
	display:none;
}
.SlideDesPopup{
	z-index:2;
	position:absolute;
	opacity:0.7;
	background-color:#000;
	color:#fff;
	font-size:10px;
	cursor:pointer;
	padding-left:4px;
	padding-right:4px;
	padding-top:2px;
	padding-bottom:2px;
	display:none;
	margin-top:280px;
}
.SlideDesFullPopup{
	margin-left:auto;
	margin-right:auto;
	color:#fff;
	font-size:14px;
	cursor:pointer;
	padding-left:4px;
	padding-right:4px;
	padding-top:2px;
	padding-bottom:2px;
}
.SlideFull{
	display:none;
}
.SlideFull img{
	background-color:#333;
	padding:4px;
	cursor:pointer;
}
</style>
</head>

<body>
<div id="daddy">
	<div id="header">
		<?php 
			$activemenu="home";
			include "./lib/menuinit.php"; 
		?>
	</div>
	<!-- header -->
	<div id="content">
		<div id="cA">
			
            <!-- menu doc --->
            <?php include "./applications/default/components/loadVerticalMenu.php";?>
			<!-- ket thuc menu doc --->            
            
		</div><!-- cA -->
		<div id="cB">
			<div class="Ctopright"></div>
			<div id="cB1">
				<br/>
				<table width="400" border="0" cellspacing="0">
					<tr>
						<td class="DLHeadRedL" width="17" height="34">&nbsp;
							
						</td>
						<td  class="DLHeadRed" height="34" valign="top">
							<?php echo constant("WELCOMEPAGE");?>
						</td>
						<td class="DLHeadRedR" width="17" height="34">&nbsp;
							
						</td>
					</tr>
				</table>
				<br/>
				<div class="DLTypeintro" id="black-slideshow">
					<div class="SlideWelcome" align="center">
						<?php echo constant("TITLE_WELCOME");?>
						
					</div>
					<div id="slide-bounder">
						<div id="slide-list">
							<div class="SlideImgIntro">
								<p class="SlideDesPopup">view large image</p>
								<img src="images/slideshow/home-slide.0.jpg"/>
							</div>
							<div class="SlideImgIntro">
								<p class="SlideDesPopup">view large image</p>
								<img src="images/slideshow/home-slide.1.jpg"/>
							</div>
							<div class="SlideImgIntro">
								<p class="SlideDesPopup">view large image</p>
								<img src="images/slideshow/home-slide.2.jpg"/>
							</div>
							<div class="SLClear">
							</div>
						</div>
						<div id="slide-full" class="SlideFull" align="center">
								
								<img src="images/slideshow/full-slide.0.jpg"/>
								<div class="SlideDesFullPopup" onclick="hideFullImage()">close(x)</div>
								
						</div>
					
						<div class="HomeSummary">
							<?php echo $lvm_category_detail; ?>
						</div>
						<div id="contact-detail" class="contactdetails">
							<div align="center">
								<img src="images/loading_bar.gif"/>
							</div>
						</div>
					</div>
				</div>

            </div> <!-- end cB1-->
		</div><!-- cB -->
		<div class="Cpad">
			<br class="clear" /><div class="Cbottomleft"></div><div class="Cbottom"></div><div class="Cbottomright"></div>
		</div><!-- Cpad -->
	</div><!-- content -->
	<div id="properspace"></div><!-- properspace -->
</div><!-- daddy -->
<?php include "./lib/footer.php"; ?>
</body>
</html>
<script language="javascript" type="text/javascript">

</script>